- index = local_assigns.fetch(:index, nil)
- snippet_title = local_assigns.fetch(:result, nil)
- position = index + 1

.search-result-row
  %h4
    = link_to gitlab_snippet_path(snippet_title), data:  { event_tracking: 'click_search_result', event_label: @scope, event_value: position } do
      = truncate(snippet_title.title, length: 60)
      = snippet_badge(snippet_title)
    %span.gl-text-default.monospace.tiny.gl-float-right.term
      = snippet_title.file_name

  %small.gl-float-right.gl-text-default
    - if snippet_title.project_id?
      = link_to snippet_title.project.full_name, project_path(snippet_title.project)

  .snippet-info
    = snippet_title.to_reference
    %span
      by
      = link_to user_snippets_path(snippet_title.author) do
        = render Pajamas::AvatarComponent.new(snippet_title.author, size: 16, class: '-gl-mt-1')
        = snippet_title.author_name
      %span.light= time_ago_with_tooltip(snippet_title.created_at)
